|
Table of Contents
NOTE: you can find this and other lessons in a
more complete and viewable format (including all Figures) in our Tutorial PDF.
Lesson 10. Customizing the Control Breaks
-
This lesson introduces additional parms available to customize your control breaks. The control statement discussed is:
-
the
AVERAGE
,
MAXIMUM
and
MINIMUM
statistical parms of the
BREAK
statement
-
the
HEADING
and
FOOTING
parms of the
BREAK
statement
How to Print Statistics at a Control Break
-
You may want to print other statistics in addition to totals at a control break. The total line, as we have seen, prints automatically at control breaks. By supplying the appropriate parm in the
BREAK
statement, you can also print up to five additional statistical lines at a control break. These parms are listed in the following table:
-
Parm
|
-
Description
|
-
AVERAGE
(
AVG
)
|
-
Average value (mean)
|
-
NZAVERAGE
(
NZAVG
)
|
-
Average of only the non-zero values
|
-
MAXIMUM
(
MAX
)
|
-
Maximum value
|
-
MINIMUM
(
MIN
)
|
-
Minimum value
|
-
NZMINIMUM
(
NZMIN
)
|
-
Non-zero minimum value
|
-
You can specify as many of these parms as you like in the
BREAK
statement. The parms may be specified in any order. (The statistic lines in the report, however, always print in a standard fixed order.) For example:
BREAK: SMF14-JOBID AVERAGE MAXIMUM
-
The
BREAK
statement above requests that an average line and a maximum line print (in addition to the totals line) whenever the contents of the
SMF14-JOBID
field changes.
-
The report in Figure _ uses the above statement.
Printing statistics and custom headings and footings at control breaks
Printing statistics and custom headings and footings at control breaks
|
Customized Break Heading and Footing Lines
-
In addition to the totals line (and other statistics lines) discussed above, you can also print your own custom lines at the beginning or end of a control group. The parms (in the
BREAK
statement) to do this are:
-
the
HEADING
parm
-
the
FOOTING
parm
-
You can specify any number of these parms. Each parm results in one line that will be printed at the beginning or end of the control group. Within these parms, specify a "print expression." Print expressions are combinations of literal text and field names, of the sort that we have used earlier in the
COLUMNS
statement and the
TITLE
statement.
-
One powerful feature of the
FOOTING
parm is that you can print a statistical value (total, average, maximum, etc.) of a field, rather than just the value of that field from the last record in the control group. You can do that by specifying one of the statistical parms in parentheses after the field name:
BREAK: SMF14-JOBID FOOTING('MAXIMUM EXCP COUNT WAS' SMF14EXCP(MAX))
-
The report in Figure _ shows examples of some of these additional features. Notice that by moving the long
SMF14-JOBID
field out of the
COLUMNS
statement and into a break heading line, we opened up much more room for data in the actual report lines. That is one good way to use break headings.
-
For a much more detailed discussion of customizing control breaks with these features, see
Using Break Headings for Hierarchical Report Layouts
-
Here is another example of using custom headings to produce a complex report. In fact, the result is so sophisticated that most people would not guess that it came from just a few lines of 4GL report writer code.
-
This sample report uses just the type 70 subtype 1 SMF records (RMF Processor Activity). These records have a complex layout. Each record contains a variable number of "LPAR sections," one for each logical partition in the system. Furthermore, there are a variable number of "logical processor sections" for each of those LPAR sections. However, all of these logical processor sections are grouped together near the end of the SMF record -- not physically within each owning LPAR section.
This report features nested normalization and customized break headings
This report features nested normalization and customized break headings
|
This report features nested normalization of SMF sections and customized break headings
This report features nested normalization of SMF sections and customized break headings
|
-
Nevertheless, Spectrum SMF Writer easily handles these records so you quickly create powerful reports from your RMF data. We use nested
NORMALIZE
parms on the
INPUT
statement to process each logical processor that exists for each logical partition. (The
NORMALIZE
parm was discussed earlier in "How to Report on Multiple Occurrences of a Section".)
-
The report is sorted by LPAR name and then by logical processor address.
-
The report is formatted to reflect the hierarchical layout of the SMF 70 records. We used the page titles to show information about the physical CPU, since it is applies to all of the LPARs.
-
Then, for each of the LPARs, we print a header section containing ID information, as well as capacity and MSU values.
-
Following that are the report lines for each of the logical processors for that LPAR. On each processor line we show the percentage of the RMF reporting interval for which that processor was: 1) online, 2) waiting, 3) effectively dispatched and 4) processor dispatched. Note that the percentage fields used are not actually in the RMF record itself. They are computed fields. However, they are included in the copy library along with the actual RMF record definitions. That means that you can use the percent fields just like any other RMF field.
Summary
-
Here is a summary of what we learned in this lesson:
-
use one or more statistical parms to request that statistical lines print at a control break
-
use
HEADING
and
FOOTING
parms in your
BREAK
statement to completely customize the lines printed around your control groups
-
the custom lines that you print at control breaks can contain a statistical value of a field (such as total, average, maximum, etc.)
To Learn More
-
You can also learn:
-
how to suppress the total line at a control break
-
how to compute percentages and ratios that apply to an entire control group
-
how to customize the Grand Totals at the end of the report
-
the complete syntax for the
BREAK
statement, in
-
-
That was the final lesson.
Back to the Table of Contents
|